home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 November / CHIP Kasım 1997.iso / ARACLAR / TER500 / 500TER._XE / SCRIPT.EXE / BLINK.TSL < prev    next >
Encoding:
Text File  |  1995-08-15  |  2.7 KB  |  83 lines

  1.  
  2. % -----------------------------------------------------------------------------
  3. %  BLINK.TSL                                          *TERMINATE PRESCRIPTION*
  4. % -----------------------------------------------------------------------------
  5. %
  6. %  Version          : 1.00
  7. %  Filename         : BLINK.TSL
  8. %  Company          : BLOKKER+BLOKKER Software
  9. %  Programmer       : Joop Blokker
  10. %  Module created   : 13-Aug-1995
  11. %  Latest revision  :
  12. %  Language/version : Terminate Prescription 1.00
  13. %  Remarks          : Use 16 foreground and 16 background colors.
  14. %                   : Include file COLOR110.INC version 1.10 needed.
  15. %
  16. % -----------------------------------------------------------------------------
  17. %
  18. % To obtain 16 foreground and 16 background colors, the blink bit
  19. % has to be disabeled. This you can do with the ToggleBlinkBit
  20. % function that is stored in COLOR110.INC
  21. %
  22. % In this demo you can see that for the background colors also
  23. % the values 8 to 15 can be used. If the Blink Bit is ON (1) then you
  24. % will see blinking text; if it is OFF (0) then the background color
  25. % is equal to the foreground color.
  26. %
  27. % Before the demo starts the current status of the Blink Bit is
  28. % retrieved with the Function BlinkBit(), so after de demo the
  29. % original status can be restored.
  30. %
  31. % Note: The Function ToggleBlinkBit(Status) contains an INTERRUPT call.
  32. % Do NOT change anything in that Function, unless you absolutely KNOW
  33. % what you are doing.
  34. %
  35. % ------------------------------------------------------------------------
  36.  
  37. Include color.inc
  38.  
  39. % Save current screen color of column 1, row 1
  40. % --------------------------------------------
  41. ClearScreen
  42. Set SaveColor = GetAttrXY(1, 1)
  43.  
  44. % Save current blink bit status
  45. % -----------------------------
  46. Set SaveBlinkBitStatus = BlinkBit(0)
  47.  
  48. SetAttr LightGray + (Red * 16)
  49. ClearScreen
  50.  
  51. % Choose color with background > 7
  52. % --------------------------------
  53. Set BoxColor = White + (LightBlue * 16)
  54. Box 30, 10, 50, 12, BoxColor, 3
  55.  
  56. GotoXY 1,1
  57. Set TColor = Black + (White*16)
  58. WriteAStr 15,18,TColor," Press any key to toggle blinkstatus. Esc to stop "
  59.  
  60. % Now Toggle Blink Bit OFF and ON
  61. % -------------------------------
  62. Set Status = BlinkBit(0)
  63. repeat
  64.   Set Dummy = ToggleBlinkBit(Status)
  65.   If Status = 0
  66.     WriteAStr, 32,11,BoxColor, " HIGH INTENSITY "
  67.     Set Status = 1
  68.   Else
  69.     WriteAStr, 32,11,BoxColor, "    BLINKING    "
  70.     Set Status = 0
  71.   Endif
  72.   Set Key = GetKey
  73. until Key=27
  74.  
  75. % Now restore the original attribute and blinkbit status
  76. % ------------------------------------------------------
  77. SetAttr SaveColor
  78. Set Dummy = ToggleBlinkBit (SaveBlinkBitStatus)
  79.  
  80. ClearScreen
  81. TERMINATE
  82.  
  83.